import { ApiProperty } from '@nestjs/swagger';
import { Column, Entity } from 'typeorm';
import { BaseEntity } from '../../../base.entity';

@Entity({ name: 'gather_distribute_parameter_computed' })
export default class GatherDistributeParameterComputed extends BaseEntity {
  @Column({ type: 'varchar', length: 50, name: 'machine_code', comment: '设备编码' })
  @ApiProperty()
  machineCode: string;

  @Column({ type: 'varchar', length: 50, name: 'parameter_code', comment: '采集编码' })
  @ApiProperty()
  parameterCode: string;

  @Column({ type: 'varchar', length: 50, name: 'parameter_name', comment: '采集名称' })
  @ApiProperty()
  parameterName: string;

  @Column({ type: 'varchar', length: 50, name: 'num1_val_type', comment: '值1类型' })
  @ApiProperty()
  num1ValType: string;

  @Column({ type: 'float', name: 'num1_val', nullable: true, comment: '值1固定值' })
  @ApiProperty()
  num1Val: number;

  @Column({ type: 'varchar', length: 50, name: 'num1_order_key', nullable: true, comment: '值1字典表编码' })
  @ApiProperty()
  num1OrderKey: string;

  @Column({ type: 'varchar', length: 50, name: 'computed_type', comment: '计算类型' })
  @ApiProperty()
  computedType: string;

  @Column({ type: 'varchar', length: 50, name: 'num2_val_type', comment: '值2类型' })
  @ApiProperty()
  num2ValType: string;

  @Column({ type: 'float', name: 'num2_val', nullable: true, comment: '值2固定值' })
  @ApiProperty()
  num2Val: number;

  @Column({ type: 'varchar', length: 50, name: 'num2_order_key', nullable: true, comment: '值2字典表编码' })
  @ApiProperty()
  num2OrderKey: string;

  @Column({ type: 'varchar', length: 50, name: 'order_key_value', nullable: true, comment: '值2字典表字段' })
  @ApiProperty()
  orderKeyValue: string;

  @Column({ type: 'varchar', nullable: true, comment: '备注' })
  @ApiProperty()
  remark: string;
}
